<template>
  <div>
    <el-dropdown>
    <span class="el-dropdown-link">
      <el-avatar
        src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
        shape='square'
        size='large'
      />
    </span>
    <template #dropdown>
      <el-dropdown-menu>
        <el-dropdown-item @click="loginOut">退出</el-dropdown-item>
      </el-dropdown-menu>
    </template>
  </el-dropdown>
    </div>
</template>

<script setup>
import { useStore } from 'vuex'

const store = useStore()
const loginOut = () => {
  store.dispatch('user/loginOut')
}
</script>

<style>

</style>
